package com.caigou.service;

import com.caigou.bean.bid.entity.BidPrivilege;
import com.caigou.bean.cms.entity.Privilege;
import com.caigou.bean.cms.entity.UserBaseInfo;
import com.caigou.bean.cms.entity.UserPrivilege;
import com.caigou.bean.cms.param.*;
import com.caigou.bean.exam.entity.UserInfo;
import com.caigou.bean.exam.entity.Users;
import com.caigou.bean.exam.param.*;
import com.caigou.bean.exam.vo.CurrentUserVO;
import com.caigou.bean.exam.vo.MsgCodeVO;
import com.caigou.bean.exam.vo.UserVO;
import com.caigou.bean.param.FunctionStaffPrivilegeParam;
import com.caigou.bean.param.PrivilegeParam;
import com.caigou.bean.vo.PrivilegeVO;
import com.caigou.bean.vo.RoleUserVO;
import com.caigou.bean.vo.StaffPrivilegesVO;
import com.caigou.bean.vo.UserRegisterVO;
import com.caigou.util.Result;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface IUsersService {

    Users findUserByTel(String tel);

    List<Privilege> findPrivilegesByUsername(String userName, Integer type);

    List<Privilege> findPrivilegesByRoleIds(List<String> roleIds, Integer type);

    CurrentUserVO currentUser(String username);

    Result<Integer> registerUser(RegisterUserParam param);

    Users getCurrentUserInfo();

    Result<Integer> forgotPassword(RegisterUserParam param);

    Result findUsersByParam(UsersParam param);

    Result findRolesByParam();

    Result<Integer> addRoleByParam(RoleParam param);

    Result<Integer> assignRoles(AssignRoleParam param);

    List<Privilege> findAllPrivileges();


    Result removeRoles(AssignRoleParam param);

    Result<List<PrivilegeVO>> findRolePrivilegesByRoleId(RoleParam param);

    Integer editUserInfo(EditUserInfoParam param);

    UserBaseInfo findUserInfoByUserId(String userid);

    List<Privilege> findAllLevelPrivileges();

    Integer addPrivileges(PrivilegeParam param);

    Integer editPrivileges(PrivilegeParam param);

    Integer deletePrivileges(Integer id);

    Result<String> findUsersRealNameByParam(UserRealNameParam param);

    Result<String> addUsersRealName(UserRealNameParam param);

    Result queryUser(UsersParam param);

    Result updateUserStatus(UsersParam param);

    Result updateTel(UsersUpdateParam param);

    Result updatePassword(UsersUpdateParam param);

    Result<UserVO> queryUserDetail(UsersParam param);

    List<String> listLabelNameByUserId(String userId);

    Result<StaffPrivilegesVO> findStaffPrivilegesByParam(FunctionStaffPrivilegeParam param);

    Result<Integer> saveStaffPrivilegesByUserId(FunctionStaffPrivilegeParam param);


    Result<List<RoleUserVO>> findRolesUser();

    Result<MsgCodeVO> sendSmsCode(MsgCodeParam param);

    Result<Integer> assignRolePrivilege(AssignRolePrivilegeParam param);

    int getReceiveSystemMessageUserCount(Integer publishTime);

    Result<UserRegisterVO> findUserRegisterByParam(UserRegisterParam param);

    Result<Integer> deleteRoleByRoleCode(RoleParam param);

    List<UserPrivilege> findPrivilegeCodesByUserId(String userId);

    Result<List<PrivilegeVO>> findStaffPrivilegesByUserId(String userId);

    Result updateStaffTel(UsersUpdateParam param);

    Result<Boolean> findUserHasRecycleAuthority(Integer privilegeType, String userid);

    Result<UserInfo> getUserInfoByUserId(String userid);

    Result<Users> getUserDetailByUserId(String userId);

    Result updateUserDetail(UserDetailParam param);

    Result uploadImage(MultipartFile file, String userId);

    List<BidPrivilege> findBidPrivilegesByUserId(String userId, int unstructuredData);
}
